Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-transition

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-transition

Animated transitions for D3 selections.

  • 1.3.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.5M
decreased by-16.52%
Maintainers
1
Weekly downloads
 
Created

What is d3-transition?

The d3-transition package is part of the D3 (Data-Driven Documents) library that provides a module for animating DOM elements using smooth transitions. It allows developers to interpolate styles, attributes, and other properties over time, creating dynamic and interactive visualizations.

What are d3-transition's main functionalities?

Initializing a Transition

This code selects a 'circle' element and initializes a transition on it, then changes its fill color to blue over the default transition duration.

d3.select('circle').transition().style('fill', 'blue');

Setting Transition Duration

This code selects a 'circle' element, initializes a transition with a specified duration of 750 milliseconds, and then changes its fill color to blue.

d3.select('circle').transition().duration(750).style('fill', 'blue');

Delaying a Transition

This code selects a 'circle' element, initializes a transition with a delay of 500 milliseconds before starting, and then changes its fill color to blue.

d3.select('circle').transition().delay(500).style('fill', 'blue');

Easing Functions

This code selects a 'circle' element, initializes a transition with a bounce easing function, and then changes its fill color to blue.

d3.select('circle').transition().ease(d3.easeBounce).style('fill', 'blue');

Chaining Transitions

This code selects a 'circle' element and creates a chained transition, first changing the fill color to red and then to blue, each with its own transition period.

d3.select('circle').transition().style('fill', 'red').transition().style('fill', 'blue');

Other packages similar to d3-transition

Keywords

FAQs

Package last updated on 18 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc